﻿using Ninject;
using Ninject.Modules;

namespace HobSoft.SoccerBet2014.Server
{
    using Domain.Common.SiteContext;
    using Domain.Implementation.RedisRepository;
    using Domain.DataService;

    public class ApplicationIocModule : NinjectModule
    {
        public override void Load()
        {

            Bind<Log.ApplicationCacheLogAppender>()
                .ToSelf()
                .InSingletonScope();

            Bind<SiteManagerSchedule.ScheduleManager>()
                .ToSelf()
                .InSingletonScope();
            Bind<SiteManagerSchedule.BfScheduleManager>()
                .ToSelf()
                .InSingletonScope();

            Bind<MainForm>()
                .ToSelf()
                .InSingletonScope();
                //.WithConstructorArgument("_scheduleManager", Kernel.Get<SiteManagerSchedule.ScheduleManager>())
                //.WithConstructorArgument("_betsettingService", Kernel.Get<IBetSettingService>())
                //.WithConstructorArgument("_persistentModelsService", Kernel.Get<Domain.Implementation.Service.PersistentModelsService>())
                //.WithConstructorArgument("kernel", Kernel);

            Bind<SiteContextSyncDialog>()
                .ToSelf()
                .InSingletonScope();
        }
    }
}
